<!-- 功能模块通用文件 -->
<script type="text/javascript" src="${request.contextPath}/assets/js/xm-select.js?${(.now)!}"></script>
<script type="text/javascript">
    let radioSelectRender = function (obj) {
        let df = {
            radio: true,
            clickClose: true,
            // 样式
            theme: {
                color: '#16baaa',
            },
            model: {
                label: {
                    type: 'text',
                }
            }
        };
        const mergedObj = Object.assign({}, obj, df);
        let select = xmSelect.render(mergedObj);
        $.ajax({
            url: obj.url,
            type: "post",
            dataType: 'json',
            success: function (data) {
                if (data.code === 1) {
                    select.update({
                        data: data.data
                    })
                    //select.setValue(obj.initValue)
                }
            },
            error: function (e) {

            }
        });
        return select;
    }
    let multipleSelectRender = function (obj) {
        let df = {
            // 样式
            theme: {
                color: '#16baaa',
            }
        };
        const mergedObj = Object.assign({}, obj, df);
        let select = xmSelect.render(mergedObj);
        $.ajax({
            url: obj.url,
            type: "post",
            dataType: 'json',
            success: function (data) {
                if (data.code === 1) {
                    select.update({
                        data: data.data
                    })
                }
            },
            error: function (e) {

            }
        });
        return select;
    }

</script>